import request from '@/utils/request';

// 查询字典类型列表
export function apiListType(query) {
  return request({
    url: '/system/dict/type/list',
    method: 'get',
    params: query
  });
}

// 查询字典类型详细
export function apiGetType(dictId) {
  return request({
    url: '/system/dict/type/' + dictId,
    method: 'get'
  });
}

// 新增字典类型
export function apiAddType(data) {
  return request({
    url: '/system/dict/type',
    method: 'post',
    data: data
  });
}

// 修改字典类型
export function apiUpdateType(data) {
  return request({
    url: '/system/dict/type',
    method: 'put',
    data: data
  });
}

// 删除字典类型
export function apiDelType(dictId) {
  return request({
    url: '/system/dict/type/' + dictId,
    method: 'delete'
  });
}

// 导出字典类型
export function apiExportType(query) {
  return request({
    url: '/system/dict/type/export',
    method: 'get',
    params: query
  });
}

// 获取字典选择框列表
export function apiOptionselect() {
  return request({
    url: '/system/dict/type/optionselect',
    method: 'get'
  });
}
